import java.util.Scanner;
import java.lang.Integer;
public class Test2 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a;
		while (scanner.hasNext()) {
			a = scanner.nextInt();
     		if (a >= 10000 && a <= 20000)
				System.out.println(Integer.toBinaryString(a) + "," + 
						Integer.toOctalString(a) + "," + Integer.toHexString(a));
			else
			{
				int sum = 0;
				String s = Integer.toString(a);
				for (int i = 0; i < s.length(); i++) {
					if (s.charAt(i) != '-') {
						System.out.print(s.charAt(i) + " ");
						sum += s.charAt(i) - '0';
					}
				}
			}
		}
		scanner.close();
	}
}
